﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BL;

namespace StockVentas
{
    public partial class frmPrincipal : Form
    {
        public frmProgress progreso;
        string origen, accion;

        public frmPrincipal()
        {
            InitializeComponent();
            foreach (Control control in this.Controls)
            {
                MdiClient client = control as MdiClient;
                if (!(client == null))
                {
                    client.BackColor = this.BackColor;
                    break;
                }
            }
        }

        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmClientes newMDIChild = new frmClientes();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

        private void ventasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmVentas newMDIChild = new frmVentas();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

        private void movimientosDeTesoreríaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmTesoreriaMov newMDIChild = new frmTesoreriaMov();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

        private void fondoDeCajaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFondoCajaPunto newMDIChild = new frmFondoCajaPunto();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

        private void compensaciones_Click(object sender, EventArgs e)
        {
            frmStockComp newMDIChild = new frmStockComp();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

        private void compensacionesInter_Click(object sender, EventArgs e)
        {
            frmStockCompInter newMDIChild = new frmStockCompInter();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

        private void movimientosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmStockMovInter newMDIChild = new frmStockMovInter();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

        private void stockDeArtículosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmStockInter newMDIChild = new frmStockInter();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }       

        private void arqueoDeCajaToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmArqueoInter newMDIChild = new frmArqueoInter();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

        private void ventasEnPesos_Click(object sender, EventArgs e)
        {
            frmVentasPesosInter newMDIChild = new frmVentasPesosInter();
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

        private void btnArticulos_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            frmArticulos articulos = new frmArticulos();
            articulos.Show();
            Cursor.Current = Cursors.Arrow;
        }

        private void actualizarArticulos_Click(object sender, EventArgs e)
        {
            origen = "frmArticulos";
            accion = "cargar";
            frmProgress newMDIChild = new frmProgress(origen, accion);
            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }

    }
}
